<template>
  <div :class="{wrapper:true}">
    <el-form ref="form" :model="form" label-width="80px">
      <el-form-item label="用户名:">
        <el-input v-model="form.userName"></el-input>
      </el-form-item>
      <el-form-item label="密码:">
        <el-input v-model="form.password" type="password"></el-input>
      </el-form-item>
      <el-button type="success">登入</el-button>
    </el-form>
  </div>
</template>

<script>
import { find } from "../api";
export default {
  data() {
    return {
      form: {
        userName: "",
        password: "",
        region: "",
        date1: "",
        date2: "",
        delivery: false,
        type: [],
        resource: "",
        desc: ""
      }
    };
  },
  methods: {
    onSubmit() {
      console.log("submit!");
    }
  },
  mounted() {

    find().then(res=>{
      console.log(res)
    });
  }
};
</script>
<style scoped>
.el-button {
  width: 325px;
  margin-left: 55px;
  margin-top: 30px;
}
.el-form {
  width: 480px;
  height: 300px;
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  margin: auto;
  background: #fff;
  padding: 50px 55px 50px 20px;
  box-sizing: border-box;
}
.wrapper {
  width: 100%;
  height: 100%;
  background: #2f4050;
}
</style>

